//
//  JKNavigationController.swift
//  afanti
//
//  Created by albert on 16/4/15.
//  Copyright © 2016年 albert. All rights reserved.
//

import UIKit

class JKNavigationController: UINavigationController {
    
    override class func initialize(){
        let bar = UINavigationBar.appearance()
        
        bar.setBackgroundImage(UIImage(named: "aft_feedback_cansubmit"), forBarMetrics: UIBarMetrics.Default)
        bar.titleTextAttributes = [NSForegroundColorAttributeName : UIColor.whiteColor()]
        bar.tintColor = UIColor.whiteColor()
        
        
//        let item = UIBarButtonItem.appearance()
//        item.setTitleTextAttributes([NSForegroundColorAttributeName : UIColor.whiteColor()], forState: UIControlState.Normal)
        
        
    }

    override func pushViewController(viewController: UIViewController, animated: Bool) {
        
        if self.childViewControllers.count > 0{
            
            viewController.hidesBottomBarWhenPushed = true
        }
         
        super.pushViewController(viewController, animated: animated)
    }

}
